package com.kidedu.action;

import com.kidedu.entity.KStudent;
import com.kidedu.service.IKGradeService;
import com.kidedu.service.IKStudentService;
import com.kidedu.util.BaseAction;
import com.kidedu.util.Pagination;
import com.kidedu.util.SpringContextUtil;

public class KStuAction extends BaseAction{
	private static final long serialVersionUID = 1L;
	
	private String t_id;
	
	private int pageNo;
	
	private String S_id;
	
	private String Sparentname;
	
	private String Sparenttel;
	
	private IKGradeService ikGradeService = (IKGradeService) SpringContextUtil.getBean("iKGradeService");
	private IKStudentService ikStudentService = (IKStudentService) SpringContextUtil.getBean("iKStudentService");
	
	private Pagination<KStudent> KKidPagList;
	
	/*获取幼儿信息*/
	public String selectKidList(){
		KKidPagList = ikGradeService.getStubyTeaPage(t_id, pageNo);
		return "JSON";
	}
	
	/* 修改幼儿列表 */
	public String updateKid(){
		KStudent kStudent = new KStudent();
		kStudent.setSid(S_id);
		kStudent.setSparentname(Sparentname);
		kStudent.setSparenttel(Sparenttel);
		ikStudentService.updateSingleStudent(kStudent);
		return "JSON";
	}

	public String getT_id() {
		return t_id;
	}

	public void setT_id(String t_id) {
		this.t_id = t_id;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public String getS_id() {
		return S_id;
	}

	public void setS_id(String s_id) {
		S_id = s_id;
	}

	public String getSparentname() {
		return Sparentname;
	}

	public void setSparentname(String sparentname) {
		Sparentname = sparentname;
	}

	public String getSparenttel() {
		return Sparenttel;
	}

	public void setSparenttel(String sparenttel) {
		Sparenttel = sparenttel;
	}

	public Pagination<KStudent> getKKidPagList() {
		return KKidPagList;
	}

	public void setKKidPagList(Pagination<KStudent> kKidPagList) {
		KKidPagList = kKidPagList;
	}
}
